Skip to main content

Viz - Sankey

First Steps

Add dimensions to the Nodes mark card and a measure to the Value mark card to display a Sankey.

Marks card

Data Format

Data is expected to have three columns: source, target, and values for each link. Additional fields in the sheet can be used to further customize the Sankey.

Customization

Click the format extension button to customize the Sankey. Three methods are available:

  • Direct: Enter a value directly in the window.
  • Parameter: Select a parameter; its value defines the characteristic.
  • Field: Select a field in the sheet; its values define the element aspects.
NameDefaultAccepted ValuesAdditional Information
background colorwhiteHTML names, hexadecimal, rgb. See color names and codesEx: LightBlue, #ADD8E6, rgb(173, 216, 230).
highlight colorredHTML names, hexadecimal, rgbEx: LightBlue, #ADD8E6, rgb(173, 216, 230).
link colornonesource, target, source-target, HTML names, hexadecimal, rgbEx: LightBlue, #ADD8E6, rgb(173, 216, 230).
palettenonetableau 10, tableau 20, colorblind, seattle grays, traffic light, miller stone, superfishel stone, nuriel stone, jewel bright, summer, winter, green-orange-teal, red-blue-brown, purple-pink-gray, hue circle
link percentagenonenone, source, target, both
column palettenonetableau 10, tableau 20, colorblind, seattle grays, traffic light, miller stone, superfishel stone, nuriel stone, jewel bright, summer, winter, green-orange-teal, red-blue-brown, purple-pink-gray, hue circle
column percentagefalsetrue, false
column titlestopnone, top, bottom
alignmentjustifyjustify, left, right, center
font size10NumbersThe font size of column titles are always 4px larger than the selected font size.

Example

Watch this tutorial video to learn how to create a Sankey chart with the Sample - Superstore datasource:

After adding the extension, add data to the Nodes and Value mark cards.

You can further customize the Sankey. In this example, the background color is set by entering a value directly. The link color is set to source-target. The column palette is set to the Tableau palette Miller Stone. The link percentage is set to both, and the column percentage is set to true, by selecting values in the dropdown menu.

Highlight part of the Sankey by clicking a node. Double-click a node to filter the Sankey and display only its links. Double-click the same node again to remove the filter.